<!-- Created by caiqi on 17/6/19. -->
<template>
  <div class="left_m">
    <div class="name">{{userInfo.nickname}}</div>
    <div class="flag">{{userInfo.introduction}}</div>
    <div class="address">现居住地：{{userInfo.address}}</div>
    <div class="about">
      <div>现有文章：{{userInfo.docCount}}</div>
      <div>总阅览数：{{userInfo.watchCount}}</div>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
import api from "@/api/index";
// import tools from "@/server/storage.server";

export default {
  data() {
    return {
      userInfo: {}
    };
  },
  methods: {
    async getInfo(user_id) {
      const { data, code } = await api.leftmune(user_id);
      if (code === 0) {
        this.userInfo = data;
      }
    }
  },
  mounted() {
    this.getInfo("5b895f4bfd7e0c5d81891963");
  },
  watch: {}
};
</script>

<style lang="scss" rel="stylesheet/scss" scoped>
.left_m {
  color: #fff;
  padding: 0 25px;
  .name {
    padding: 50px;
    text-align: center;
    font-size: 20px;
  }
  .flag {
    text-align: center;
    font-size: 14px;
    color: rgb(202, 200, 200);
  }
  .address,
  .about {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: rgb(179, 179, 179);
  }
}
</style>
